package com.zlf.start;

import java.util.List;

import javax.xml.ws.Endpoint;

import org.apache.cxf.interceptor.LoggingInInterceptor;
import org.apache.cxf.interceptor.LoggingOutInterceptor;
import org.apache.cxf.jaxws.EndpointImpl;

import com.zlf.cxf.service.util.interceptor.CheckUser;

/**
 * webservice 服务端启动程序
 * @author zlf
 *
 */
public class testServcie {
	public static void main(String[] args)throws Exception{
		                                                                
//		String url="http://localhost:8999/cxf/date";
//		Endpoint publish = Endpoint.publish(url, new ServiceDateImp());//添加服务
//
//		EndpointImpl endpointImpl=(EndpointImpl)publish;
//		List inFaultInterceptors = endpointImpl.getInInterceptors();
//		inFaultInterceptors.add(new CheckUser());//添加自定义拦截器
//		inFaultInterceptors.add(new LoggingInInterceptor());//添加日志入拦截器
//
//		List outFaultInterceptors = endpointImpl.getOutInterceptors();
//		outFaultInterceptors.add(new LoggingOutInterceptor());//添加日志出拦截器
//
//
//		System.out.println("启动服务");
		
	}
}
